<?php

namespace App\Library\Requests\AfterSale;

use App\Library\Requests\Base\SerialNumberRequest;
use App\Library\Rules\MediasImgRule;
use App\Library\Rules\MediaVideoRule;

class AfterSaleAuctionApply extends SerialNumberRequest
{
    public function rules(): array
    {
        return array_merge(parent::rules(), [
            'reasonId' => 'required|integer|in:' . implode(',', array_keys(__('reason.auctionAfterSale'))),
            'description' => 'nullable|string|max:255',
            'fileIds' => ['nullable', 'array', new MediasImgRule],
            'videoId' => ['nullable', 'string', 'size:20', 'regex:' . __('com.numReg'), new MediaVideoRule],
        ]);
    }
}
